-- GENERATED SPELL FOR [Gregor the Justiciar] --


function spell0_17910(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17910', 6345, 1)
end

function spell1_17910(pUnit, Event) --@Hammer of Wrath,n/a--
pUnit:FullCastSpellOnTarget(32772,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17910', 1000, 1)
end

function spell2_17910(pUnit, Event) --@Holy Shock,n/a--
pUnit:FullCastSpellOnTarget(32771,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17910', 649, 1)
end

function Sorts_17910(pUnit, Event)
local choix_sorts_17910 = math.random(0, 2)
if choix_sorts_17910 == 0 then
pUnit:RegisterEvent('spell0_17910', 1, 1)
end
if choix_sorts_17910 == 1 then
pUnit:RegisterEvent('spell1_17910', 1, 1)
end
if choix_sorts_17910 == 2 then
pUnit:RegisterEvent('spell2_17910', 1, 1)
end
end

function mob17910_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17910', math.random(1500, 3000), 1)
end

function mob17910_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17910_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17910_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17910, 1, 'mob17910_Action')
RegisterUnitEvent(17910, 2, 'mob17910_Leave')
RegisterUnitEvent(17910, 3, 'mob17910_Kill')
RegisterUnitEvent(17910, 4, 'mob17910_Die')
